package 代码记录.校招笔试真题.笔试真题_2022.海能达;

import java.util.Arrays;
import java.util.Scanner;

/**
 * 比较版本号(原题)
 */
public class Test3 {
    public static void main(String[] args) {
        Scanner sc = new Scanner(System.in);
        String version1 = sc.nextLine();
        String version2 = sc.nextLine();
        String[] v1 = version1.split("\\.");
        String[] v2 = version2.split("\\.");
        int res = 0;
        for(int i = 0;i < Math.max(v1.length,v2.length);i++){
            int a = 0, b = 0;
            if(i < v1.length){
                a = Integer.valueOf(v1[i]);
            }
            if(i < v2.length){
                b = Integer.valueOf(v2[i]);
            }
            if(a > b){
                res = 1;
                System.out.println(res);
                return;
            }
            if(a < b){
                res = -1;
                System.out.println(res);
                return;
            }
        }
        System.out.println(res);
    }
}
